package com.youmeek.demo.web.servlet.service.Impl;

import com.youmeek.demo.web.servlet.pojo.Role;
import com.youmeek.demo.web.servlet.pojo.User;
import com.youmeek.demo.web.servlet.service.RoleService;

import java.util.ArrayList;
import java.util.List;

public class RoleServiceImpl implements RoleService {

    private RoleServiceImpl(){ }
    private static final RoleServiceImpl ROLE_SERVICE = new RoleServiceImpl();
    public static RoleServiceImpl getInstance(){
        return ROLE_SERVICE;
    }

    @Override
    public List<Role> getJson() {
        List<Role> roleList = new ArrayList<>();
        Role role = new Role();
        role.setrName("管理层");
        role.setUserList(UserServiceImpl.getInstance().getUser());
        //模拟数据
        roleList.add(role);
        return roleList;
    }
}
